package org.webguvenligi.jsecureimage;

/**
 * @author Bedirhan Urgun
 */

public class JSecureImageTest {

	public static void testImage(String fileName, String imageType){
		
		try{
			JSecureImage.isValidImage("testimages", fileName, imageType);
			System.out.println("valid image: " + fileName + " with type " + imageType);
		}
		catch(JSecureImageException jsie){
			System.out.println("invalid image: " + fileName + " with type " + imageType + " with exception: "+ jsie.getMessage());
		}

	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		JSecureImageTest.testImage("valid.gif", "gif");
		JSecureImageTest.testImage("valid.jpg", "jpg");
		JSecureImageTest.testImage("valid.png", "png");
		JSecureImageTest.testImage("test.gif", "gif");
		JSecureImageTest.testImage("test.gif", "png");
		JSecureImageTest.testImage("test.gif", "jpg");
		JSecureImageTest.testImage("valid.gif", "jpg");
		JSecureImageTest.testImage("valid.gif", "png");
		JSecureImageTest.testImage("valid.jpg", "gif");
		JSecureImageTest.testImage("valid.jpg", "png");
		JSecureImageTest.testImage("valid.png", "gif");
		JSecureImageTest.testImage("valid.png", "jpg");

	}

}
